
Page({
  data: {
    song:[
  
    ],
    // 存储文本框的内容
    content:'',

  },
  
  onLoad() {
    const that = this

    wx.request({
      url: 'http://122.112.161.135:3000/top/playlist?cat=%E5%8D%8E%E8%AF%AD',
      header: {
        'Content-Type': 'application/json'
      },
      success: function(res) {
        // console.log(res.data);
        that.setData({
          song :res.data.playlists
        })
       
      }
    })
  },


  // 输入框input事件的回调
  contentChange(e) {
   
    this.setData({
      content : e.detail.value
    })
    console.log(this.content);
    
  }

})